import io.jsonwebtoken.Claims;
import org.example.util.JwtUtil;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.util.HashMap;

public class test {
    public static void main(String[] args) throws Exception {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", "2314");
        map.put("username", "test");
        String string = JwtUtil.generateToken(map);
        System.out.println("string = " + string);
        boolean b = JwtUtil.validateToken(string);
        System.out.println("b = " + b);
        Claims fromToken = JwtUtil.getClaimsFromToken(string);
        Object object = fromToken.get("userInfo");
        System.out.println("fromToken = " + object);
    }
}
